<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var num = 20;
        console.log(num);
        function fun(count) {
            count += 1;
            console.log(count);

        }
        fun(num);
        console.log(num);
        var obj = {
            name: '老周',
        }
        console.log(obj.name);
        function funobj(item) {
            item.name= '老曾';
            console.log(item.name);
            
        }
        funobj(obj);
        var arr = [1,2,3];
        var arr2= arr;
        console.log(arr,arr2);
        function funarr(nums){
            nums.push(4);
            console.log(nums);
        }
        funarr(arr2);
        console.log(arr,arr2);
        arr2 = [1,2,3];
        console.log(arr,arr2);
        
    </script>
</body>

</html>